# $Id$
# Maintainer: Daniel Isenmann <daniel@archlinux.org>

pkgname=babl
pkgver=0.1.56
pkgrel=1
pkgdesc="Dynamic, any to any, pixel format conversion library"
arch=(x86_64)
url="http://gegl.org/babl/"
license=(LGPL3)
depends=(glibc)
makedepends=(git)
_commit=0449b887bd57ecb3dff1fa931410b3fb13cf4858  # tags/BABL_0_1_56^0
source=("git+https://gitlab.gnome.org/GNOME/babl.git#commit=$_commit")
sha256sums=('SKIP')

# Don't port to meson until babl's runtime cpu detection works there

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^BABL_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  make -C $pkgname check
}

package() {
  DESTDIR="$pkgdir" make -C $pkgname install
}

# vim:set sw=2 et:
